<template>
    <div class="professionBaseInfo">
      <el-breadcrumb separator="/" class="breadcrumb-bottom">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>活动管理</el-breadcrumb-item>
        <el-breadcrumb-item>活动列表</el-breadcrumb-item>
        <el-breadcrumb-item>活动详情</el-breadcrumb-item>
      </el-breadcrumb>

      <div>
        <div class="float-left table-title-before">
          专业基本信息管理
        </div>
        <el-button-group style="margin-bottom:4px;" class="float-right">
          <el-button type="primary"><router-link to="/ClassBaseInfoOperate" style="">新增专业</router-link></el-button>
          <el-button type="primary">导入数据</el-button>
          <el-button type="primary">导出数据</el-button>
        </el-button-group>
      </div>

      <el-table
        :data="professionTable"
        border
        style="width: 100%">
        <el-table-column
          type="selection"
          width="55">
        </el-table-column>
        <el-table-column
          prop="majorId"
          label="专业编号"
          width="180">
        </el-table-column>
        <el-table-column
          prop="majorName"
          label="专业名称"
          width="180">
        </el-table-column>
        <el-table-column
          prop="majorShortName"
          label="专业简称"
          width="180">
        </el-table-column>
        <el-table-column
          prop="majorSort"
          label="学科门类"
          width="180">
        </el-table-column><el-table-column
        prop="teachingDirector"
        label="教研室主任"
        width="180">
      </el-table-column>
        <el-table-column
          prop="majorManager"
          label="学科负责人"
          width="180">
        </el-table-column>
        <el-table-column
          label="操作">
          <template scope="scope">
            <router-link to="/ClassBaseInfoOperate"><i class="el-icon-edit"></i></router-link>
            <!--<router-link to="'/ClassBaseInfoOperate/' + tableData.ClassId"><i class="el-icon-edit"></i></router-link>-->
            <!--<router-link :to="{ name: 'ClassBaseInfoOperate', params: { classId: 02 }}"><i class="el-icon-edit"></i></router-link>-->
          </template>
        </el-table-column>
      </el-table>


      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400">
      </el-pagination>

    </div>
</template>
<style>
</style>
<script>
    export default{
        name : 'professionBaseInfo',
        data(){
            return{
                professionTable:[]
            }
        },
        components:{
        },
        mounted:function(){
            this.$nextTick(function(){
              this.queryRes();
            })
        },
        methods: {
            queryRes:function(){
               this.$http.get('/static/data.json',[]).then(response => {
                    for (const element of response.body.professionTable){
                        this.professionTable.push(element);
                    }
              }, response => {
                 console.log('文件获取失败');
              });
            }
        }
    }
</script>
